import { PureComponent, ReactNode, useState } from "react";

class Pure extends PureComponent {

	render(): ReactNode {
		console.log('pure rendering');
		return <div>AAA</div>;
	}
}


export default () => {
	const [count, setCount] = useState(0);

	return <div>
		<div>{count}</div>
		<button
			className="w-30 p-2 bg-red-400 text-white"
			onClick={() => setCount(count + 1)}
		>
			increase
		</button>
		<Pure />
	</div>;
};